<?php
/*   Description  of this file
 *    Author king-of-war
 *    Last Modified 2009-5-6
 *    This class designed  for the friend link operation
 */
 @session_start();
  echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';

 $root_path='../';
 include_once $root_path.'admin/smarty_config.php';
include_once $root_path.'admin/class/flink.class.php';
include_once $root_path.'admin/class/verify.class.php';

/*
 * check the right
 */
$check=new verify($root_path);
$check->identity_check(2);
/*
 *get Post data &&  flink add
 */
 $flink=new flink($root_path);
$info = '友情链接添加';
if(isset($_POST['submit'])){


	$name=$_POST['name'];
	$image=$_POST['image'];
	$introduction=$_POST['introduction'];
	$url=$_POST['url'];
	$verify=$_POST['verify'];


/*
 * $fun: 1 for add
 */
$bool= $flink->flink_add(NULL,$name,$image,$introduction,$url,$verify,1) ;
if($bool){
	$info= '添加成功';
}else{
	$info= '添加失败';
}

}
/*
 * set the template for flink.php
 */

$smarty->assign("state",$info);
$smarty->display("flink.html");





?>
